package mvpexample.client;

import mvpexample.client.presenter.PresenterImpl;
import mvpexample.client.view.AddOrderView;
import mvpexample.client.view.AddOrderViewImpl;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class MVPExample implements EntryPoint {

	@Override
	public void onModuleLoad() {
		
		GreetingServiceAsync rpcService = GWT.create(GreetingService.class);
		
		AddOrderViewImpl aov = new AddOrderViewImpl();
		AddOrderView.Presenter presenter = new PresenterImpl(rpcService, aov);
		
		aov.setPresenter(presenter);
		RootPanel.get("mvp").add(aov);
	}
}
